<?xml version="1.0" encoding="utf-8"?>


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <androidx.drawerlayout.widget.DrawerLayout
        android:id="@+id/drawerLayout"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="?android:attr/windowBackground">

        <androidx.coordinatorlayout.widget.CoordinatorLayout
            android:id="@+id/coordinatorLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.google.android.material.appbar.AppBarLayout
                android:id="@+id/app_bar_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fitsSystemWindows="true">

                <com.google.android.material.appbar.CollapsingToolbarLayout
                    android:id="@+id/collapsible_toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fitsSystemWindows="true"
                    app:layout_scrollFlags="scroll|enterAlways">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        app:layout_collapseMode="pin">

                        <androidx.appcompat.widget.Toolbar
                            android:id="@+id/my_awesome_toolbar"
                            android:layout_width="match_parent"
                            android:layout_height="?attr/actionBarSize"
                            android:background="?attr/colorPrimary"
                            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                            app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

                            <ProgressBar
                                android:id="@+id/progressBarLoading"
                                android:layout_width="34dp"
                                android:layout_height="34dp"
                                android:layout_marginStart="22dp"
                                android:layout_marginLeft="22dp"
                                android:indeterminate="true"
                                android:theme="@style/ProgressBarCircle"
                                android:visibility="gone" />
                        </androidx.appcompat.widget.Toolbar>

                        <com.google.android.material.tabs.TabLayout
                            android:id="@+id/tabs"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_gravity="bottom"
                            android:background="?attr/colorPrimary"
                            android:visibility="gone"
                            app:tabIndicatorColor="?attr/colorTabUnderline"
                            app:tabMode="scrollable"
                            app:tabSelectedTextColor="@color/windowBackground"
                            app:tabTextColor="@color/windowBackground" />
                    </LinearLayout>


                </com.google.android.material.appbar.CollapsingToolbarLayout>
            </com.google.android.material.appbar.AppBarLayout>

            <FrameLayout
                android:id="@+id/containerView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="?android:attr/actionBarSize"
                android:orientation="vertical"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />

            <include layout="@layout/layout_player_bottom_sheet" />

        </androidx.coordinatorlayout.widget.CoordinatorLayout>

        <com.google.android.material.navigation.NavigationView
            android:id="@+id/my_navigation_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:layout_marginTop="0dp"
            android:background="?android:attr/windowBackground"
            app:itemIconTint="@color/menu_text_color"
            app:itemTextColor="@color/menu_text_color"
            app:menu="@menu/menu_drawer" />

    </androidx.drawerlayout.widget.DrawerLayout>


    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/menuBottomBackgroundColor"
        app:itemBackground="?attr/selectableItemBackgroundBorderless"
        app:itemHorizontalTranslationEnabled="true"
        app:itemIconTint="@color/menu_bottom_text_color"
        app:itemTextColor="@color/menu_bottom_text_color"
        app:menu="@menu/menu_bottom_navigation" />

</LinearLayout>
